﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="AdminConfirmBorrowed.aspx.vb" Inherits="QLThuVien.AdminConfirmBorrowed" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title> Xác nhận mượn</title>
    <link href="../assets/css/bootstrap.css" rel="stylesheet" type="text/css" />
    <link href="../assets/css/font-awesome.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" >
        function changeTextGT(s, e) {
            var str = lbl_gioitinh.GetValue();
            if (str == "True") {
                lbl_gioitinh.SetText("Nam");

            } else {
                lbl_gioitinh.SetText("Nữ");

            }
        }
        function changeTextKM(s, e) {
            var str = lbl_kieumuon.GetText();
            if (str == "1") {
                lbl_kieumuon.SetText("Mượn Về Nhà");

            } else {
                lbl_kieumuon.SetText("Mượn Tại Chỗ");

            }
        }
        function hidePopup(s, e) {
            var p = window.parent;
            var popup = p.window["popup_xacnhanmuon"];
            popup.Hide();
        }
        function hideAllPopup(s, e) {
            var p = window.parent;
            var popup1 = p.window["popup_muonsach"];
            var popup2 = p.window["popup_xacnhanmuon"];
            popup1.Hide();
            popup2.Hide();
            p.location.reload();
        }
    </script>  
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    <div>
    <h2 style="border-bottom:3px solid gray" class="text-info" > Thông Tin Độc Giả</h2>
    <div>
    <asp:DataList ID="DataList_XacNhanMuon" runat="server" ClientIDMode="Static"  RepeatDirection="Horizontal" RepeatLayout="Flow">
        <ItemTemplate>
            <table width="100%">
                <tbody class="col-lg-12">
                    <tr style="padding-bottom:5px;">             
                        <td class="col-lg-6">  
                        <div class="form-group">
                            <span class="label label-primary">Tài Khoản:</span>                           
                            <dx:ASPxLabel ID="lbl_taikhoan" runat="server" Text='<%# Eval("taikhoan")%>'>
                            </dx:ASPxLabel>                   
                        </div>
                        <div class="form-group">
                            <span class="label label-primary">Tên:</span>
                             <%# Eval("ten")%>
                        </div>
                        <div class="form-group">
                            <span class="label label-primary" >Giới Tính:</span>
                            <dx:ASPxLabel ID="lbl_gioitinh"  ClientInstanceName="lbl_gioitinh" runat="server" Text='<%# Eval("gioitinh")%>' Font-Size="Small">
                            <ClientSideEvents Init="changeTextGT" /> 
                            </dx:ASPxLabel>
                            
                        </div>                       
                        </td>

                        <td class="col-lg-6">
                        <div class="form-group">
                            <span class="label label-primary">Số Điện Thoại:</span>
                             <%# Eval("sdt")%>
                        </div>
                        <div class="form-group">
                            <span class="label label-primary">Địa Chỉ:</span>
                             <%# Eval("diachi")%>
                        </div>
                                                             <div class="form-group" style="cursor:pointer" >
                                         <dx:ASPxButton ID="btn_lichsumuon" runat="server" CssClass="label label-warning"  ClientInstanceName="btn_lichsumuon"  Text="Lịch Sử Mượn"  onclick="btn_lichsumuon_Click" >
                                         <Border BorderStyle="None" />
                                         
                                         </dx:ASPxButton>
                         </div> 
                        </td>
                        <td class="col-lg-6 col-sm-3">
                            <dx:ASPxImage ID="img_docgia" runat="server" ShowLoadingImage="true" EmptyImage-Url="~/img/noImgDocGia.png" Height="160px" Width="250px" ImageUrl='<%#Eval("hinh")%>' >
                            </dx:ASPxImage>
                        </td>
                    </tr>

                    
                </tbody>
            </table>
            </ItemTemplate> 
            </asp:DataList>
            <table width="100%">
            <div>
                <caption>
                    <h2 class="text-info" style="border-bottom:3px solid gray">
                        Thông Tin Mượn</h2>
                </caption>
            </div>
                <tbody class="col-lg-12">
                
                <tr>                                                            
                <td class="col-lg-6">

                    <div class="form-group">
                            <span class="label label-danger">Nhân Viên Cho Mượn:</span>
                            <dx:ASPxLabel ID="lb_nv" runat="server">
                            </dx:ASPxLabel>
                        </div> 
                    <div class="form-group">
                            <span class="label label-danger">Kiểu Mượn:</span>
                        <dx:ASPxLabel ID="lbl_kieumuon" runat="server" Font-Size="Small" ClientInstanceName="lbl_kieumuon">
                        <ClientSideEvents Init="changeTextKM" /> 
                        </dx:ASPxLabel>   
                        </div>                    
                    </td>
                    <td class="col-lg-6">
                        <div class="form-group">
                            <span class="label label-danger">Ngày Mượn:</span>
                             <%= Request.QueryString("ngaymuon")%>
                        </div> 
                        <div class="form-group">
                            <span class="label label-danger">Ngày Trả:</span>
                             <%= Request.QueryString("ngaytra")%>
                        </div>
                    
                    </td>
                    </tr>     
                    </tbody>
            </table>
            <div class="col-lg-12">
                <dx:ASPxGridView ID="grid_InfoSachMuon" runat="server"  EnableTheming="True" 
                Width="100%" AutoGenerateColumns="False" KeyFieldName="id_sach">
                
                <Columns>
                    <dx:GridViewDataColumn FieldName="id_sach" VisibleIndex="1" Caption="Mã Sách" CellStyle-HorizontalAlign="Center">
                        
                        <HeaderStyle Font-Bold="True" BackColor="#428bca" ForeColor="White"  HorizontalAlign="Center"  />
                    </dx:GridViewDataColumn>
                    <dx:GridViewDataColumn FieldName="tensach" VisibleIndex="2" Caption="Tên Sách" CellStyle-HorizontalAlign="Center">
                        
                        <HeaderStyle Font-Bold="True" BackColor="#428bca" ForeColor="White"  HorizontalAlign="Center"  />
                    </dx:GridViewDataColumn>
                    <dx:GridViewDataColumn FieldName="tacgia" VisibleIndex="3" Caption="Tác Giả" CellStyle-HorizontalAlign="Center">
                        
                        <HeaderStyle Font-Bold="True" BackColor="#428bca" ForeColor="White"  HorizontalAlign="Center"  />
                    </dx:GridViewDataColumn>
                    <dx:GridViewDataColumn FieldName="nxb" VisibleIndex="4" Caption="Nhà Xuất Bản" CellStyle-HorizontalAlign="Center">
                        
                            <HeaderStyle Font-Bold="True" BackColor="#428bca" ForeColor="White"  HorizontalAlign="Center"  />
                                            
                    </dx:GridViewDataColumn>
                    
                </Columns>
                
                </dx:ASPxGridView>
            </div>
            <table width="100%">
          <tbody class="col-lg-12">
          <tr>
          <td class="col-lg-2">
                 <div class="row" style="padding-top:20px;padding-bottom:5px;float:right">                             
                                    <dx:ASPxButton ID="btn_dongy" runat="server"  CssClass="btn btn-primary" Text="Xác Nhận" >
                                    </dx:ASPxButton>                                                               
                                                                                       
                                    <dx:ASPxButton ID="btn_quaylai" runat="server"  CssClass="btn btn-danger" Text="Quay Lại" >
                                    <ClientSideEvents Click="hidePopup" />
                                    </dx:ASPxButton>                                                                                               
                             </div>                 
          </td>
          </tr>
              
          </tbody>
          </table>
    </div>    
    </div>
    <dx:ASPxPopupControl ID="pc_lichsumuon" runat="server" HeaderText="Lịch Sử Mượn" PopupElementID="hpl_lichsumuon"  AllowDragging="true" AllowResize="true" CloseAnimationType="Fade"      >
    <ContentCollection>
    <dx:PopupControlContentControl>
         <dx:ASPxGridView ID="grid_lichsumuon" KeyFieldName="id_sach" Width="100%" AutoGenerateColumns="False" runat="server" >
         <Columns>
             <dx:GridViewDataColumn FieldName="id_sach" VisibleIndex="1" Caption="Mã Sách" CellStyle-HorizontalAlign="Center">
                        
                        <HeaderStyle Font-Bold="True" BackColor="#428bca" ForeColor="White"  HorizontalAlign="Center"  />

<CellStyle HorizontalAlign="Center"></CellStyle>
                    </dx:GridViewDataColumn>
             <dx:GridViewDataColumn FieldName="ngaytra" VisibleIndex="2" Caption="Ngày Trả" CellStyle-HorizontalAlign="Center">
                        
                        <HeaderStyle Font-Bold="True" BackColor="#428bca" ForeColor="White"  HorizontalAlign="Center"  />

<CellStyle HorizontalAlign="Center"></CellStyle>
                    </dx:GridViewDataColumn>
            <dx:GridViewDataColumn FieldName="mucphat" VisibleIndex="3" Caption="Tiền Phạt" CellStyle-HorizontalAlign="Center">
                        
                        <HeaderStyle Font-Bold="True" BackColor="#428bca" ForeColor="White"  HorizontalAlign="Center"  />

<CellStyle HorizontalAlign="Center"></CellStyle>
                    </dx:GridViewDataColumn>
                     <dx:GridViewDataColumn FieldName="ghichu" VisibleIndex="4" Caption="Ghi Chú" CellStyle-HorizontalAlign="Center">
                        
                        <HeaderStyle Font-Bold="True" BackColor="#428bca" ForeColor="White"  HorizontalAlign="Center"  />

<CellStyle HorizontalAlign="Center"></CellStyle>
                    </dx:GridViewDataColumn>
         </Columns> 
        </dx:ASPxGridView>
    </dx:PopupControlContentControl>   
    </ContentCollection> 
       
    </dx:ASPxPopupControl>
     </ContentTemplate> 
    </asp:UpdatePanel>
    </form>
     
</body>
</html>
